package com.cskaoyan.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.File;

@RestController
@RequestMapping("file")
public class FileController {

    @Value("${file.location}")
    String fileLocation;

    @Value("${file.maxSize}")
    Integer maxSize;

    @Value("${file.pngPath}")
    String pngPath;

    @Value("${file.jpgPath}")
    String jpgPath;

    @RequestMapping("upload")
    public String upload() {
        File file = new File(fileLocation, "banner.png");
        return "file upload";
    }
}
